package com.car.service.department;

import com.car.dao.department.DepartmentDao;
import com.car.entity.Department;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: DepartmentServiceImpl
 * @Description:
 * @Author 余全盛
 * @Date: 2021/12/2 14:51
 */
@Service
public class DepartmentServiceImpl implements DepartmentService {
    @Autowired
    private DepartmentDao departmentDao;

    @Override
    public List<Department> selectAllDepartments() {
        return departmentDao.selectList(null);
    }

    @Override
    public Department getDepartmentById(Integer departmentId) {

        return departmentDao.selectById(departmentId) ;
    }
}
